<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>task 1 10 </title>
  <style>
    @media screen and (min-width:640px){
      body{
        padding:20px;
        display: flex;
        justify-content:space-between;
        align-items:center;
      }
    }
    @media screen and (max-width:640px){
      body{
        padding:20px;
        display: flex;
        flex-wrap:wrap;
        justify-content:space-between;
      }
      .item:last-child{
        order: -1;
      }
    }
    .item {
      width: 150px;
      margin-bottom: 20px;
      border:1px solid #f00;
    }
    .h120{
      height:120px;
    }
    .h100{
      height:100px;
    }
    .h40{
      height:40px;
    }
    .h200{
      height:200px;
      border-color:#0f0!important;
    }
  </style>
</head>
<body>
  <!-- <div class="box"> -->
    <div class="item h120"></div>
    <div class="item h100"></div>
    <div class="item h40"></div>
    <div class="item h200"></div>
  <!-- </div> -->
</body>
</html>